<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
  </head>

  <body>
    <div id="app"></div>

    <script>
      //1.参数问题：
      //1.1放入两个参数
      const sum = (num1, num2) => {
        return num1 + num2
      }
      //1.2放入一个参数 小括号可以省掉
      const power = num => {
        return num * num
      }
      //2.函数中的代码
      //2.1有多行
      const test = () => {
        //1.打印helloword
        console.log('helloworld')
        console.log('helloworld')
      }
      //2.2有一行
      const mul = (num1, num2) => {
        return num1 * num2
      }
      //等于下面这个 省掉了 return 和{}
      const mul = (num1, num2) => num1 * num2
    </script>
  </body>
</html>
